<template>
    <div>
        <van-nav-bar title="开票信息" left-text="返回" left-arrow border fixed @click-left="$router.go(-1)" />
        <div style="height:50px"></div>
        <div class="title">
            发票信息
        </div>
        <div class="info-line">
            <div>是否后付款</div>
            <div>{{infoSource.lag_pay_text}}</div>
        </div>
        <div class="info-line">
            <div>付款方式</div>
            <div>{{infoSource.payment_type_text}}</div>
        </div>
        <div class="info-line">
            <div>发票类型</div>
            <div>{{infoSource.invoice_type_text}}</div>
        </div>
        <div class="info-line">
            <div>开票名称</div>
            <div>{{infoSource.invoice_name}}</div>
        </div>
        <div class="info-line">
            <div>开票类型</div>
            <div>{{infoSource.invoice_class_text}}</div>
        </div>
        <div class="info-line">
            <div>公司名称</div>
            <div>{{infoSource.invoice_company}}</div>
        </div>
        <div class="info-line">
            <div>税号</div>
            <div>{{infoSource.invoice_tax_code}}</div>
        </div>
        <div class="info-line">
            <div>公司地址</div>
            <div>{{infoSource.address}}</div>
        </div>
        <div class="info-line">
            <div>联系电话</div>
            <div>{{infoSource.invoice_mobile}}</div>
        </div>
        <div class="info-line">
            <div>开户行</div>
            <div>{{infoSource.invoice_bank}}</div>
        </div>
        <div class="info-line">
            <div>开户账号</div>
            <div>{{infoSource.invoice_bank_code}}</div>
        </div>
        <div class="info-line">
            <div>是否见票付款</div>
            <div>{{infoSource.invoice_pay_text}}</div>
        </div>
        <div style="height: 10vh"></div>
    </div>
</template>
<script>
export default {
    name: "invoiceInfo",
    data() {
        return {
            infoSource: {}
        };
    },
    methods: {
        // 方法
        getInfo() {
            let params = {
                wx_member_id: localStorage.getItem('wx_member_id'),
                token: localStorage.getItem('token'),
            };
            this.$post("/api/finance/invoice", params)
                .then(res => {
                    if (res.code == 1) {
                        this.infoSource = res.data
                    } else {
                        this.$Toast(res.msg)
                    }
                })
                .catch(err => { });
        }
    },
    beforeCreate() {
        document.querySelector("body").setAttribute("style", "background-color:#fff");
    },
    created() {
        // 实例创建完成
        this.getInfo();
    },
};
</script>
<style lang="less" scoped>
// @import url("../../asset/css/invoiceInfo");

.info-line {
    border-bottom: 1px solid #eee;
    margin: 0 16px;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;

    > div:nth-of-type(1) {
        width: 100px;
        margin-right: 13px;
        color: #777777;
    }

    > div:nth-of-type(2) {
        flex: 1;
        color: #333;
    }
}

.border-last:last-child {
    border: none;
}
</style>